// 导入layout
import Layout from '@/layout'
// 导出动态路由
export const asyncRoutes = [

  {
    path: '/manage-base-info',
    component: Layout,
    redirect: '/manage-base-info',
    name: 'Example',
    meta: { title: '基础信息管理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'warehouse',
        name: 'Warehouse',
        component: () => import('@/views/manage-base-info/warehouse'),
        meta: { title: '仓库管理', icon: 'table' }
      },
      {
        path: 'warehouse/newcreate',
        name: 'NewCreate',
        component: () => import('@/views/manage-base-info/warehouse/NewCreate')
      },
      {
        path: 'area',
        name: 'area',
        component: () => import('@/views/manage-base-info/area'),
        meta: { title: '库区管理', icon: 'tree' }
      },
      {
        path: 'location',
        name: 'location',
        component: () => import('@/views/manage-base-info/location'),
        meta: { title: '库位管理', icon: 'tree' }
      },
      {
        path: 'location-view',
        name: 'location-view',
        component: () => import('@/views/manage-base-info/location-view'),
        meta: { title: '库位视图', icon: 'tree' }
      },
      {
        path: 'goods',
        name: 'goods',
        component: () => import('@/views/manage-base-info/goods'),
        meta: { title: '货品管理', icon: 'tree' }
      },
      {
        path: 'goods-type',
        name: 'goods-type',
        component: () => import('@/views/manage-base-info/goods-type'),
        meta: { title: '货品类型管理', icon: 'tree' }
      }
    ]
  },
  {
    path: '/manage-business',
    component: Layout,
    meta: { title: '商务管理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'goods-owner',
        name: 'goods-owner',
        component: () => import('@/views/manage-business/goods-owner'),
        meta: { title: '货主管理', icon: 'form' }
      },
      {
        path: 'task-picking',
        name: 'task-picking',
        component: () => import('@/views/manage-business/task-picking'),
        meta: { title: '承运商管理', icon: 'form' }
      }
    ]
  },
  {
    path: '/manage-storage',
    component: Layout,
    meta: { title: '库内管理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'list',
        name: 'list',
        component: () => import('@/views/manage-storage/list'),
        meta: { title: '盘点单', icon: 'form' }
      },
      {
        path: 'list-task',
        name: 'list-task',
        component: () => import('@/views/manage-storage/list-task'),
        meta: { title: '盘点任务', icon: 'form' }
      },
      {
        path: 'storage-lose-profit',
        name: 'storage-lose-profit',
        component: () => import('@/views/manage-storage/storage-lose-profit'),
        meta: { title: '库存损益', icon: 'form' }
      },
      {
        path: 'latest-storage',
        name: 'latest-storage',
        component: () => import('@/views/manage-storage/latest-storage'),
        meta: { title: '实时库存', icon: 'form' }
      }
    ]
  },
  {
    path: '/manage-storage-in',
    component: Layout,
    meta: { title: '入库管理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'list-in/list',
        name: 'list',
        component: () => import('@/views/manage-storage-in/list'),
        meta: { title: '入库单', icon: 'form' }
      },
      {
        path: 'list-in/task-receive',
        name: 'task-receive',
        component: () => import('@/views/manage-storage-in/task-receive'),
        meta: { title: '收货任务', icon: 'form' }
      },
      {
        path: 'list-in/task-add',
        name: 'task-add',
        component: () => import('@/views/manage-storage-in/task-add'),
        meta: { title: '上架任务', icon: 'form' }
      }
    ]
  },
  {
    path: '/manage-storage-out',
    component: Layout,
    meta: { title: '入库管理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'list-out',
        name: 'list-out',
        component: () => import('@/views/manage-storage-out/list-out'),
        meta: { title: '出库单', icon: 'form' }
      },
      {
        path: 'list-in/task-picking',
        name: 'task-picking',
        component: () => import('@/views/manage-storage-out/task-picking'),
        meta: { title: '拣货任务', icon: 'form' }
      },
      {
        path: 'manage-task-transfer',
        name: 'manage-task-transfer',
        component: () => import('@/views/manage-storage-out/manage-task-transfer'),
        meta: { title: '交接任务', icon: 'form' }
      }
    ]
  }
]
